package team.seekers.catering.user.entity.dao;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import team.seekers.catering.common.enums.EatLogTypeEnum;
import team.seekers.catering.common.enums.FoodAmountTypeEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * @author hbc
 * @since 2022-3-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="user对象", description="")
public class UserLogEat implements Serializable{

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @TableField(value = "u_id")
    private String userId;

    @TableField(value = "c_id")
    private String comboId;

    @ApiModelProperty(value = "依据进食时段分的日志类型")
    @JsonValue
    private EatLogTypeEnum type;

    @ApiModelProperty(value = "根据不同的食物量类型，用于计算热量")
    @JsonValue
    private FoodAmountTypeEnum foodAmountType;

    @TableLogic
    private Integer isDeleted;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
